package com.qf.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 你的名字
 * @Date: 2021/07/06/12:35
 * @Description:
 */
@Configuration
public class webMvcConfig {
    public class MyConfig implements WebMvcConfigurer {
        @Override
        public void addResourceHandlers(ResourceHandlerRegistry registry) {
            //这里是指在url上面打的内容
            registry.addResourceHandler("/**")
                    //下面的是指可以对应resources文件下那些内容
                    .addResourceLocations("classpath:/")
                    .addResourceLocations("classpath:/templates/")
                    .addResourceLocations("classpath:/static")
                    .addResourceLocations("classpath:/templates/user");
        }
    }
}
